<?php

function withFlyer ($row)
{
    preg_match("/imageid:(.*)/i", $row['flyer_href'], $matches);
    $flyer_id = $matches[1];
    $size = getimagesize($GLOBALS['cfgPaths']['CMSImgPath'].$flyer_id.".jpg");
    ?>
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
            <td class="aktuellimg" width="290" valign="top">
            <img src="<?php echo $GLOBALS['cfgPaths']['CMSImgUrl'].$flyer_id.".jpg" 
            ?>" <?php echo $size[3] ?>/></td>
            <td width="8"></td>
            <td class="aktuelltext" valign="top"><h2><?php 
            echo $row['date_day'] ?>.<?php 
            echo $row['date_month'] ?>.<?php 
            echo $row['date_year'] ?> <?php echo $row['title_text'] ?></h2>
            <?php echo $row['teaser_text'] ?><br/><br/>
            <a href="dates/<?php 
            echo $row['date_year'] ?>/<?php 
            echo $row['date_month'] ?>/<?php 
            echo $row['date_day'] ?>.php">[mehr...]</a></td>
            <td width="50"></td>
        </tr>
    </table><br/>
    <?php
}

function withoutFlyer ($row)
{
    ?>
        <h2><?php 
            echo $row['date_day'] ?>.<?php 
            echo $row['date_month'] ?>.<?php 
            echo $row['date_year'] ?> <?php echo $row['title_text'] ?></h2>
        <?php echo $row['teaser_text'] ?><br/><br/>
            <a href="dates/<?php 
            echo $row['date_year'] ?>/<?php 
            echo $row['date_month'] ?>/<?php 
            echo $row['date_day'] ?>.php">[mehr...]</a>
    <?php
}

?>